import 'package:flutter/material.dart';
import 'package:test1/View/MyRowText.dart';
import 'package:test1/pages/lifecycle/FlutterLifeCycle.dart';
import 'package:test1/pages/lifecycle/StateLifeCycle.dart';

class LifeCycle_Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("生命周期"),
        ),
        body: ListView(
          children: <Widget>[
            MyRowText(
                "组件State生命周期",
                () => Navigator.push(context,
                        MaterialPageRoute(builder: (BuildContext context) {
                      return StateLifeCycle();
                    }))),
            MyRowText(
                "Flutter生命周期",
                () => Navigator.push(context,
                        MaterialPageRoute(builder: (BuildContext context) {
                      return FlutterLifeCycle();
                    }))),
          ],
        ),
      ),
    );
  }
}
